import request from '@/utils/request'

// 查询文章标签关联列表
export function listClass(query) {
  return request({
    url: '/admin/forum/class/list',
    method: 'get',
    params: query
  })
}

// 查询文章标签关联详细
export function getClass(atricleId) {
  return request({
    url: '/admin/forum/class/' + atricleId,
    method: 'get'
  })
}

// 新增文章标签关联
export function addClass(data) {
  return request({
    url: '/admin/forum/class',
    method: 'post',
    data: data
  })
}

// 修改文章标签关联
export function updateClass(data) {
  return request({
    url: '/admin/forum/class',
    method: 'put',
    data: data
  })
}

// 删除文章标签关联
export function delClass(atricleId) {
  return request({
    url: '/admin/forum/class/' + atricleId,
    method: 'delete'
  })
}

// 单删文章标签
export function delSingleClassAPI(classId){
  return request({
    url: '/admin/forum/class/removeById/'+ classId,
    method: 'delete'
  })
}

// 获取父类目
export function getParentListAPI(){
  return request({
    url: '/admin/forum/class/classList',
    method: 'get'
  })
}
